package com.zj.whichone.bean;

import com.zj.whichone.constant.UserRoot;

import lombok.Data;
/**
 * 菜单表,对应表menu
 * @author zj20160705
 *
 */
@Data
public class Menu {
	//非数据库字段
	private boolean flag=false;//创建树结构时是否已经加入树了
	
	private int id;
	private String name;
	private int parentId;
	private String resUrl;//资源url
	private String icon;
	private Integer root;//权限
	private String rootPhrase;//权限说明
	private int type;
	@Override
	public String toString() {
		return "Menu [id=" + id + ", name=" + name + ", parentId=" + parentId + "]";
	}
	public String getRootPhrase(){
		rootPhrase = UserRoot.getPhrase(root);
		return rootPhrase;
	}
}
